package com.foreknow.mapping;

import com.foreknow.model.Business;

import java.sql.ResultSet;
import java.sql.SQLException;

public class BusinessMapping implements EntityMapping {
    @Override
    public Object mapping(ResultSet rs) throws SQLException {
        Business business = new Business();
        business.setBusinessId(rs.getInt("businessId"));
        business.setBusinessName(rs.getString("businessName"));
        business.setBusinessPassword(rs.getString("password"));
        business.setBusinessAddress(rs.getString("businessAddress"));
        business.setBusinessExplain(rs.getString("businessExplain"));
        business.setStarPrice(rs.getDouble("starPrice"));
        business.setDeliveryPrice(rs.getDouble("deliveryPrice"));
        return business;

    }
}
